<script setup lang="ts">

const slots: any = defineSlots<{ left: {}, right: {}, default: {} }>()


const {title = ''} = defineProps<{
  title?: string
}>()

const slotsKey = Object.keys(slots)

</script>
<template>
  <el-card shadow="house" v-bind="$attrs">
    <el-page-header v-if="slotsKey.indexOf('left')>-1 || slotsKey.indexOf('right')>-1 || title.length>0">
      <template v-if="slotsKey.indexOf('left')>-1 || title.length>0" #content>
        <slot name="left">
          {{ title }}
        </slot>
      </template>
      <template v-if="slotsKey.indexOf('right')>-1" #extra>
        <slot name="right"></slot>
      </template>
    </el-page-header>
    <slot v-if="slotsKey.indexOf('default')>-1"></slot>
  </el-card>
</template>